<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>react</title>
<script src="../../s/react/16.13.1/react.production.min.js"></script>
<script src="../../s/react/16.13.1/react-dom.production.min.js"></script>
<script src="../../s/babel/5.8.38/browser.min.js"></script>
</head>
<body>
	<div id="root"></div>
	<script type="text/babel">
		// 元素渲染：与浏览器的 DOM 元素不同，React 元素是创建开销极小的普通对象。React DOM 会负责更新 DOM 来与 React 元素保持一致。
		function tick() {
			const element = (
				<div>
					<h1>Hello, world!</h1>
					<h2>It is {new Date().toLocaleTimeString()}.</h2>
				</div>
			);
			ReactDOM.render(element, document.getElementById('root'));
		}
		setInterval(tick, 1000);
    </script>
</body>
</html>